B26 - Output Prime Numbers
https://atcoder.jp/contests/tessoku-book/tasks/tessoku_book_cy
提出
code: python
解答
code: python
n = int(input())
deleted =
False
* 1000009
for i in range(2, int(n ** 0.5) + 1):
if deleted
i
== False:
# 次の倍数から, n まで, 倍々で
for j in range(i*2, n+1, i):
deleted
j
= True
for i in range(2, n+1):
if deleted
i
== False:
print(i)